synology.forum архив спільноти · 2005–2022
ai.synology.forum →
ГлавнаяОбмен Файлами: Windows, Mac OSX, Linux › Перенести файлы со старого NAS

Перенести файлы со старого NAS

kream23 · 12.05.2010

Привет!

 

А вот если у меня уже есть старый ну условно NAS (если точно, то этот медиа-плейер Popcorn A110 с терабайтным винтом), то каким образом я могу перенести данные с него на Synology (опять же если важно, то DS410j)?

 

Ясно, что можно между ними "комп" поставить и через него гнать, но хочется как-то серверно сделать. Чтобы я мог синолоджи мог указать путь на попкорн и сказать скопировать куда-то на него? В идеале с указанием через какой протокол.

 

Пытался разобраться с терминалом, а именно rsync и ftp-клиентами, но первый осилить не смог (в линуксе я почти ничего не знаю), а вторых попкорн почему-то на себя не пускает (хотя вроде логин-пароль указал верные).

 

Пока вот придумал использовать функциональность попкорна - есть у него возможность файлы куда-то копировать. Но хочется понять - неужто вот такая простая железка это умеет, а сино - нет.

Vladimir · 13.05.2010

Установите на Synology NAS - Midnight Commander и с его помощью скопируйте необходимые файлы с попкорна.

kream23 · 13.05.2010
Установите на Synology NAS - Midnight Commander и с его помощью скопируйте необходимые файлы с попкорна.

Гы :) А по этой идее у меня тоже тема есть - http://www.synology.forum/index.php?showtopic=1531 ибо в mc стрелки не работают :)

u03sms · 27.05.2010

Ой, а у меня тоже проблема. До купленного мною DS110j использовал NAS от Agestar'а, который успешно вышел из строя. И это Agestar'овское чудо отформатировало винт в XFS, который прочитать - целая история, сами понимаете. Как решение - взял live-дистрибутив linux'а SLAX, накатил на него модуль с русским языком и filezill'ой, подключил винт с XFS'ом к ноутбуку через USB-переходничек, загрузился с флэшки и по FTP перелил все 560 GiB на DS110j. Вроде всё успешно, а в результате на DS110j - вместо русских имен файлов - кракозябрики. При этом по FTP имена файлов правильные. Ладно, удалил всё, включил в настройках FTP-сервера UTF-8. Перезаливаю - та же самая песня.

Уважаемые, ну помощи прошу, куда копать? Перелить на компе с винта-на-винт возможности не имею.

myhnet · 27.05.2010

наверное filezill-у поковырять надо, или если кракозябриков (файлов с русскими именами) не много переименуйте и все.

Аналогично переносил файлы с диска который торчал в NAS от Chronos (почти тоже что и agestar, только внешне другой) с файловой системой XFS, подключил к компу с линукс по USB, сдул на комп, потом вставил этот диск в DS110j и залил с компа на него все по самбе, все в порядке с русским.

Zyxmon · 27.05.2010

Можно попробовать через smbclient кидать. Для smb/cifs вроде отдельные настройки кодировок локальной и удаленной файловых систем.

Igr_ua · 27.05.2010

В аналогичной ситуации я поступил проще :)

Дано:

- медиапроигрыватель Egreat EG-M34A

- ds410j.

 

Дело в том, что и у Egreat`а и у Popcorn`а файловая система EXT3.

Поэтому, я просто вставил винт в ds410j (естественно после того, как все установил) и примонтировал его вручную.

Переписывал через FileStation

 

вот краткая :) инструкция на английском...

How to add a second pre-formatted drive to your NAS to copy data from/toContents [hide]
1 Assumptions
2 Procedure
3 To remove the Disk
    This page aims to show you how to add a drive that has already been formatted elsewhere (in my case it was a RAID1 drive removed from a DS-207+ and installed in a CS-407). My reason for doing this was I wanted to copy the data from the DS-207+ onto a disk in the CS-407 ASAP. I could have copied it over ethernet (but that takes ages - 1TB), and I could have used external storage but I didn't have any big enough). 

Assumptions
You know how to login as Admin on the NAS in which you are going to install the disk 
The Disk you are adding is already preformated with either ext2 or ext3 (Synology products format internal drives as ext3). 
The disks you already have installed are in logical sequence with no gaps. e.g. if you have a CS-407 (it has 4 disk bays) with two disks installed they are installed as Disk1 and Disk2, not Disk1 and Disk3 or Disk4. It may work if they are not in logical sequence but I don't know Linux well enough to know for sure. 
Procedure
Turn off NAS and install the drive in an empty disk bay 
Power up the NAS and enable the Command Line Interface (Telnet or SSH) 
Login into the Command Line Interface as "root" 
Check what you already have mounted in the system by entering the command "df". Several things will be listed but we are only interested in the "/volume" entries in the very right hand column of the table that is displayed. Everyone should have "/volume1" and depending on how you have your current disks configured you could have "/volume2", "/volume3" etc etc. take note of the last volume number and hence the next free volume number. In my case I had a "/volume1" but NOT "/Volume2". Hence for me "/Volume2" was not being used and this is where this example will load the new drive. If you have "/volume2" or more in your system you need to use the next free volume for all commands given below. 
Now we check that the new drive is being recognised, enter the command "fdisk -l" thats a lower case L not a 1. You will see each installed disk listed and each partition on the disk listed, e.g. Disk1 will be shown as "/dev/sda", with disk2 as "/dev/sdb", disk3 (if you have one) as "/dev/sdc" etc. Disk1 being a synology formated disk will have 3 partions shown as "/dev/sda1", "/dev/sda2" and "/dev/sda3". In my case the disk I added was disk2, hence is shown as "/dev/sdb". The disk I added ("/dev/sdb") was also a synology formated disk and hence has partitions "/dev/sdb1", "/dev/sdb2" and "/dev/sdb3". On a synology formated disk the first two partitions are Synology System partions, the third partion is where the user data (shared folders) are held. 
Now we need to map the data partion to a directory on the NAS root "/". For windows users the Linux "mount" command makes data on the mounted partition appear in a directory in the operating system root directory. Before we can mount the drive we have to create the directory the mounted drive will be attached to. From the step above the next free volume number I had was "/volume2". Hence create the directory by entering the commands "cd /" and "mkdir volume2". 
Now we mount the required partition to directory "/volume2". However although the partition "/dev/sdb3" is the one we want to attach we represent it using "/dev/hdb3". Hence we now need to enter the command "mount -t ext3 /dev/hdb3 /volume2" (if your disk is ext2 formatted then use ext2 instead of ext3). Also note we are mounting "hdb3", not "sdb3". 
Finished, you can use the cp or other commands to copy/move data 
You only created a temporary mount so if you reboot the NAS you will need to re-use the same mount command again. 
If you want to mount the Disk permanently you need to modify the "/etc/fstab" file using vi using the command "vi /etc/fstab". For the example above, i.e. we want to mount disk2, you will need to add an entry like "/dev/hdb /volume2 ext3 defaults 0 0" where the "b" of "hdb" represents disk2, "hdc" would be disk3 and "hdd" disk4, etc. If you need help using vi see Basic commands for Linux VI Editor. Note in the fstab file we are describing the format and way we want the OS to handle the disk, so you don't specify the partition numbers. After modifying the fstab file. You use different options in the mount command, i.e. without the "-t" and "ext3" options. Hence enter something like "mount /dev/hdb3 /volume2" making sure you use the exact correct nomenclature for your circumstances as described previously. 
To remove the Disk
If you modified the "/etc/fstab" file to make a permanent mount re-edit it removing the line you added. 
Shutdown the NAS and remove the drive. 
When you reboot the NAS you can delete the directory you created for the mount point.

 

В двух словах:

- зайти на ds410j через SSH (через root)

- сразу создадим каталог /volume2. Для этого вводим команду cd / и mkdir volume2

- посмотреть как зовут установленный диск fdisk -l ( thats a lower case L) (Disk1 зовут "/dev/sda", disk2 - "/dev/sdb", disk3 - "/dev/sdc" и т.д.)

- командой mount прикрутить диск

 

Нюанс в том, что на диске несколько разделов (Например, Disk1 на ds410j имеет 3 раздела - "/dev/sda1", "/dev/sda2" и "/dev/sda3". Данные лежат на /dev/sda3) Т.е. если поставишь во второй слот диск из Попкорна данные будут на /dev/sdb3

- Теперь прикручиваем диск mount -t ext3 /dev/sdb3 /volume2

вот...

примерно так :)

sterlopus · 27.08.2010
If you want to mount the Disk permanently you need to modify the "/etc/fstab" file using vi using the command "vi /etc/fstab". For the example above, i.e. we want to mount disk2, you will need to add an entry like "/dev/hdb /volume2 ext3 defaults 0 0" where the "b" of "hdb" represents disk2, "hdc" would be disk3 and "hdd" disk4, etc. Note in the fstab file we are describing the format and way we want the OS to handle the disk, so you don't specify the partition numbers. After modifying the fstab file. You use different options in the mount command, i.e. without the "-t" and "ext3" options. Hence enter something like "mount /dev/hdb3 /volume2" making sure you use the exact correct nomenclature for your circumstances as described previously.

 

Помогите пож-та: монтирую NFS-шару с другого стораджа. вручную всё ок. Записываю необходимое подключение в fstab, выхожу, "mount -a" - всё ок, сетевой диск смонтирован.

 

после перезагрузки диска в точке монтирования нет. лезу в fstab - добавленной мной в прошлой сессии строчки нет. Как сделать чтобы после перезагрузки fstab не менялся на исходный???

 

Заранее благодарен

mowgli · 27.08.2010

поставить mount в rc-скрипт

sterlopus · 28.08.2010

я заглянул в /etc/rc - структура скрипта непростая и непонятная, как-то ссыкотно

 

я правильно понимаю что этот скрипт инциализации создаёт fstab всякий раз заново? просто не увидел в rc никакой толковой отсылки к процессу наполнения fstab.

 

другими словами - куда вставлять mount 192.... ? просто в конце перед exit 0?

 

upd. или вообще в rc.local будет правильно чтобы не путать системный скрипт?

mowgli · 28.08.2010

в локал конечно.

 

надо еще иметь ввиду баг синалоджика: при выключении лин должен делать анмоунт, но о том что моунтится руками тот софт, который обрабатывает нажатие на кнопку питания, не знает и отрубить не может. шотдаун/ребут через вебконсоль или cli будет работать в любом случае.

sterlopus · 29.08.2010

Спасибо. Идея непременно пригодится.

Но это ответ от другого вопроса. Хотелось бы всё-таки понять почему fstab меняется на дефолтный после ребута? И как это побороть если надо ))